package com.liushuai.demotestcxf;
//
//import java.util.HashMap;
//import com.youku.uploader.YoukuUploader;
//
//public class Upload {
//	private static YoukuUploader uploader;
//
//	public static void main(String[] args) {
//	    String client_id = "9a411d843f6254a2";
//        String client_secret = "a2057e3b7d0f38ebf6306ec9c1417317";
//        String result = "";
//        String access_token = "e409daae4dc70cc25108c7ac019324f9";
//        HashMap<String, String> params, uploadInfo;
//        String filename = "https://i.mhwsjsw.gov.cn/pay/storage/files/mpadmin/ueditor/upload/1528967440165.mp4";//视频绝对路径
//        params = new HashMap<String, String>();
//        params.put("access_token", access_token);
//            params.put("username", "18721658161");
//            params.put("password", "801801_ls");
//
//        uploadInfo = new HashMap<String, String>();
//        uploadInfo.put("target", "cloud"); // 上传目标可以选择上传至优酷或者视频云 必填 youku or cloud
//        uploadInfo.put("file_name", filename); // 指定：文件名
//        uploadInfo.put("title", "java上传测试"); // 指定：标题
//        uploadInfo.put("tags", "原创   宣教"); // 指定：分类
//        uploadInfo.put("public_type", "all"); //视频公开类型（all：公开（默认），friend：仅好友，password：需要输入密码才能观看）
//    //  uploadInfo.put("watch_password", "123456"); //密码，当public_type为password时，必填
//        uploader = new YoukuUploader(client_id, client_secret);
//        result = uploader.upload(params, uploadInfo, filename, true); // 第四个参数：boolean类型（true：显示进度 false：不显示进度）
//        System.out.print(result); //返回视频id
//           // {"video_id":"XMzY5NzcyNjQ3Ng=="}
//            //{"video_id":"XMzY5NzgyNTI4OA=="}
//    }
//}
